/*
 * Translated from the Koprina project, a Java implementation of the Skype SILK codec
 * http://code.google.com/p/koprina/
 */

using System;

namespace SilkSharp
{
	public class Silk_bwexpander_32
	{
		public static void SKP_Silk_bwexpander_32( int[] ar, int d, int chirp_Q16 )
		{
			int i;
			int tmp_chirp_Q16;

			tmp_chirp_Q16 = chirp_Q16;
			for( i = 0; i < d - 1; i++ )
			{
				ar[ i ] = Silk_macros.SKP_SMULWW( ar[ i ], tmp_chirp_Q16 );
				tmp_chirp_Q16 = Silk_macros.SKP_SMULWW( chirp_Q16, tmp_chirp_Q16 );
			}
			ar[ d - 1 ] = Silk_macros.SKP_SMULWW( ar[ d - 1 ], tmp_chirp_Q16 );
		}
	}
}
